<%@ page language="java" contentType="text/html; charset=US-ASCII"
    pageEncoding="US-ASCII"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Insert title here</title>
</head>
<body>
	<fieldset>
		<legend>Lista de Simulados</legend>
		<table border="2	">
			<thead>
				<tr>
					<th>ID</th>
					<th>Nome</th>
					<c:if test="${usuarioWeb.logado }">
					<th>Editar</th>
					<th>Remover</th>
					</c:if>
				</tr>
			</thead>
		<c:forEach var="simulado" items="${simuladosList}">
			<tr>
				<td>${simulado.id}</td>
				<td>${simulado.nome}</td>
				<c:if test="${usuarioWeb.logado }">
				<td align="center">
					<a href="<c:url value="/simulado/${simulado.id}"/>">Editar</a>
				</td>
				<td align="center">
					<form action="<c:url value="/simulado/${simulado.id}" />" method="post">
						<button class="link" name="_method" value="DELETE">Remover</button>
					</form>
				</td>
				</c:if>
			</tr>	
		</c:forEach>
		</table>
</fieldset>
</body>
</html>